Replace instances of src[..]*.rs with [/]
authorNipunn Koorapati <nipunn1313@gmail.com>
Sun, 6 Nov 2016 12:33:49 +0000 (23:33 +1100)
committerNipunn Koorapati <nipunn1313@gmail.com>
Sun, 6 Nov 2016 12:33:49 +0000 (23:33 +1100)
tests/cargotest/support/mod.rs
tests/clean.rs
tests/doc.rs
tests/metadata.rs
tests/package.rs
tests/read-manifest.rs

index cef108bcc38d0993622cca277ab0c8af82cae13b..ea63261892beb98a76239dc2cc4fc9a744ea4038 100644 (file)
@@ -351,7 +351,7 @@ impl Execs {
                  description: &str, extra: &[u8],
                  partial: bool) -> ham::MatchResult {
         let out = match expected {
-            Some(out) => substitute_macros(out),
+            Some(out) => out,
             None => return ham::success(),
         };
         let actual = match str::from_utf8(actual) {
@@ -432,6 +432,7 @@ impl Execs {
 }
 
 pub fn lines_match(expected: &str, mut actual: &str) -> bool {
+    let expected = substitute_macros(expected);
     for (i, part) in expected.split("[..]").enumerate() {
         match actual.find(part) {
             Some(j) => {
index c10b58b050a6af58a89ac20cbf2a8bdaee797914..59170ed708bd1627e6290d3acc1e3d402dd6abbe 100644 (file)
@@ -173,7 +173,7 @@ fn build_script() {
 [COMPILING] foo v0.0.1 ([..])
 [RUNNING] `rustc build.rs [..]`
 [RUNNING] `[..]build-script-build`
-[RUNNING] `rustc src[..]main.rs [..]`
+[RUNNING] `rustc src[/]main.rs [..]`
 [FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
 "));
 }
index ba5ea85ac30145f95943b9cffad8423148344fc1..457e53c25d18e1724ca7281ada22691e6862622e 100644 (file)
@@ -445,7 +445,7 @@ fn doc_release() {
                 execs().with_status(0)
                        .with_stderr("\
 [DOCUMENTING] foo v0.0.1 ([..])
-[RUNNING] `rustdoc src[..]lib.rs [..]`
+[RUNNING] `rustdoc src[/]lib.rs [..]`
 "));
 }
 
index 2ed82b294a0d3bbe63e8e9ec82b77069c4b892ef..84664712339e26b84efa0e6252a0684952cd98c1 100644 (file)
@@ -27,7 +27,7 @@ fn cargo_metadata_simple() {
                             "bin"
                         ],
                         "name": "foo",
-                        "src_path": "src[..]foo.rs"
+                        "src_path": "src[/]foo.rs"
                     }
                 ],
                 "features": {},
@@ -212,11 +212,11 @@ fn workspace_metadata() {
                     {
                         "kind": [ "lib" ],
                         "name": "bar",
-                        "src_path": "[..]bar[..]src[..]lib.rs"
+                        "src_path": "[..]bar[/]src[/]lib.rs"
                     }
                 ],
                 "features": {},
-                "manifest_path": "[..]bar[..]Cargo.toml"
+                "manifest_path": "[..]bar[/]Cargo.toml"
             },
             {
                 "name": "baz",
@@ -230,11 +230,11 @@ fn workspace_metadata() {
                     {
                         "kind": [ "lib" ],
                         "name": "baz",
-                        "src_path": "[..]baz[..]src[..]lib.rs"
+                        "src_path": "[..]baz[/]src[/]lib.rs"
                     }
                 ],
                 "features": {},
-                "manifest_path": "[..]baz[..]Cargo.toml"
+                "manifest_path": "[..]baz[/]Cargo.toml"
             }
         ],
         "workspace_members": ["baz 0.5.0 (path+file:[..]baz)", "bar 0.5.0 (path+file:[..]bar)"],
@@ -283,11 +283,11 @@ fn workspace_metadata_no_deps() {
                     {
                         "kind": [ "lib" ],
                         "name": "bar",
-                        "src_path": "[..]bar[..]src[..]lib.rs"
+                        "src_path": "[..]bar[/]src[/]lib.rs"
                     }
                 ],
                 "features": {},
-                "manifest_path": "[..]bar[..]Cargo.toml"
+                "manifest_path": "[..]bar[/]Cargo.toml"
             },
             {
                 "name": "baz",
@@ -301,11 +301,11 @@ fn workspace_metadata_no_deps() {
                     {
                         "kind": [ "lib" ],
                         "name": "baz",
-                        "src_path": "[..]baz[..]src[..]lib.rs"
+                        "src_path": "[..]baz[/]src[/]lib.rs"
                     }
                 ],
                 "features": {},
-                "manifest_path": "[..]baz[..]Cargo.toml"
+                "manifest_path": "[..]baz[/]Cargo.toml"
             }
         ],
         "workspace_members": ["baz 0.5.0 (path+file:[..]baz)", "bar 0.5.0 (path+file:[..]bar)"],
@@ -341,7 +341,7 @@ const MANIFEST_OUTPUT: &'static str=
         "targets":[{
             "kind":["bin"],
             "name":"foo",
-            "src_path":"src[..]foo.rs"
+            "src_path":"src[/]foo.rs"
         }],
         "features":{},
         "manifest_path":"[..]Cargo.toml"
index 7f3712f372425f8dc1ce9c46a9fbfe1a0816bfe2..f7b3d870cfec26163c35779538279e607915891f 100644 (file)
@@ -48,7 +48,7 @@ See [..]
     assert_that(p.cargo("package").arg("-l"),
                 execs().with_status(0).with_stdout("\
 Cargo.toml
-src[..]main.rs
+src[/]main.rs
 "));
     assert_that(p.cargo("package"),
                 execs().with_status(0).with_stdout(""));
index 44f7fa6f9eae2afae0c58649f1c6b9e502834804..e13f8ba80667ed9b8fd12b955b7d400acdde0d62 100644 (file)
@@ -21,7 +21,7 @@ fn read_manifest_output() -> String {
     "targets":[{
         "kind":["bin"],
         "name":"foo",
-        "src_path":"src[..]foo.rs"
+        "src_path":"src[/]foo.rs"
     }],
     "features":{},
     "manifest_path":"[..]Cargo.toml"